<template>
  <div id="centerRight1">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <div class="d-flex title">
          <span class="fs-xl text mx-2">战队排名</span>
        </div>
      </div>
      <div class="d-flex jc-center body-box">
        <dv-scroll-board ref="dvScolBoard" class="dv-scr-board" :config="config" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "RightBelowBox",
  props: {
    staffRankTeamList: {
      type: Array,
      default: () => [],
    }
  },
  data() {
    return {
      config: {
        header: ['排名', '战队名称', '带来访问人数', '带来报名'],
        data: [],
        //表格行数
        rowNum: 5,
        headerHeight: 35,
        //表头
        headerBGC: '#143168',
        //奇数行
        oddRowBGC: '#0f1325',
        //偶数行
        evenRowBGC: '#171c33',
        align: ['center','center','center','center']
      }
    }
  },
  created() {
    this.formatDataList();
  },
  methods: {
    formatDataList() {
      this.config.data = [];
      if (this.staffRankTeamList && this.staffRankTeamList.length > 0) {
        for (let i = 0; i < this.staffRankTeamList.length; i++) {
          const itemList = [];
          itemList.push(i + 1)
          itemList.push(this.staffRankTeamList[i].teamName)
          itemList.push(this.staffRankTeamList[i].spreadNumber)
          itemList.push(this.staffRankTeamList[i].memberBuyNumber)
          this.config.data.push(itemList);
        }
      }
    }
  }
}
</script>

<style scoped lang="scss">
$box-height: 100%;
$box-width: 100%;
#centerRight1 {
  padding: 16px;
  padding-top: 20px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    height: 100%;
    border-radius: 10px;
  }
  .title {
    text-align: center;
    padding: 5px 0;
  }
  .text {
    color: #55c7ff;
    font-weight: bold;
    text-align: center;
  }
  .body-box {
    border-radius: 10px;
    overflow: hidden;
    .dv-scr-board {
      width: 100%;
      height: 280px;
    }
  }
}
</style>
